package com.wodsy.phoenix.dataobject.goodsc.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * TbGoodsCategory entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_goods_category", catalog = "goodsc")
public class GoodsCategory implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;
	private Integer id;
	private Integer pid;		//商品类目的上一级id   0表示没有上一级
	private String name;		//商品类目名称
	private String fullName;	//商品类目的全称

	// Constructors

	/** default constructor */
	public GoodsCategory() {
	}

	/** minimal constructor */
	public GoodsCategory(String name) {
		this.name = name;
	}

	/** full constructor */
	public GoodsCategory(Integer pid, String name, String fullName) {
		this.pid = pid;
		this.name = name;
		this.fullName = fullName;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "pid")
	public Integer getPid() {
		return this.pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	@Column(name = "name", nullable = false, length = 20)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "full_name", length = 100)
	public String getFullName() {
		return this.fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

}